Skip to content

Conversation

@chwalters
Copy link
Contributor

Proposed fix for #425. Reload history when main activity resumes

Chris Walters added 2 commits July 23, 2018 09:25
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 20.338% when pulling 963b7a1 on cnw-fix-425 into 2c3e350 on develop.

if (viewPager != null && homePagerAdapter != null) {
int currentPage = viewPager.getCurrentItem();
if (currentPage == 1) { // assumption - history tab is always position 1
HistoryFragment historyFragment = homePagerAdapter.getHistoryFragment();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can override onResume in the History fragment and reload data there. However, it is not a super great solution since it will happen also when the user locked the screen, the user opened another app, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants